<template>
  <div>
    <cityHeade></cityHeade>
    <citySearch :city="city"></citySearch>
    <citylist :city="city" :letter="letter"></citylist>
    <Alphabet :city="city" @change = "handleLetterChange"></Alphabet>
  </div>
</template>

<script>
import cityHeade from "./components/cityHeade.vue";
import citySearch from "./components/citySearch.vue"
import citylist from "./components/citylist.vue";
import Alphabet from "./components/Alphabet.vue";
import city from "../../assets/city.json";
export default {
  components: {
    cityHeade,
    citylist,
    Alphabet,
    citySearch
  },
  data() {
    return {
      city: city.data,
      letter:"",
    };
  },
  methods: {
    handleLetterChange(letter) {
      console.log(letter);
      this.letter = letter;
    },
  },
};
</script>

<style lang="scss" scoped>
</style>